Skip to content

precommit hook to validate + autogenerate index/index.json master index file#93

Merged
pkieltyka merged 13 commits intomasterfrom
upgrade
Apr 5, 2025
Merged

precommit hook to validate + autogenerate index/index.json master index file#93
pkieltyka merged 13 commits intomasterfrom
upgrade

Conversation

@pkieltyka
Copy link
Member

@pkieltyka pkieltyka commented Apr 5, 2025

Big upgrade for our token-directory repo.

  1. We now generate a index/index.json file before every commit, which is a singular file that remote indexers can fetch, and from here will be able to query all other contents. It also includes a checksum of the file so indexers can keep track if the contents have changed or not. It also performs validity checks of JSON and also chainIds.
  2. New index/deprecated.json file which is manually maintained, and the idea is you can list any chain name folder in this list, and it will be labeled as deprecated in the index/index.json file.
  3. New index/external.json file which is a manually maintained list of external token lists, which can be indexed. Advantage is this is a dynamic list, and will be picked up by external indexers on-demand.
  4. We introduce new pnpm reindex which triggers pre-commit to generate the master index/index.json file
  5. We introduce new pnpm sync-external which will download the contents from remote index/external.json files and persist them in our local directory in index/_external and also added to the master index/index.json file

@pkieltyka pkieltyka changed the title precommit hook to validate + autogenerate index/index.json total directory file precommit hook to validate + autogenerate index/index.json master index file Apr 5, 2025
@pkieltyka pkieltyka merged commit 9ccf31a into master Apr 5, 2025
2 checks passed
@pkieltyka pkieltyka deleted the upgrade branch April 5, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant